The double cover $\pi:S^3\times S^3\rightarrow SO(4)$ actually provides two homotopoically distinct maps from $S^3 = Sp(1)$ to $SO(4)$, given by restricting $\pi$ to either factor. (One can easily see that these two maps induce different maps on $\pi_3$, so are not homotopic).
The following theorem is contained in
K.Grove-W.Ziller, Lifting group actions and nonnegative curvature, Trans. Amer. Math. Soc. 363 (2011) 2865-2890.
Ziller has a freely accessible version here - see the middle of page $8$.
Theorem If $E\rightarrow M$ is a rank $4$ vector bundle over $M$ (where $M$ is a compact simply connected manifold.), then $\Lambda^2(E) = \Lambda^2(E)_+\oplus\Lambda^2(E)_-$ decomposes into self-dual and antiself dual forms. Then $\Lambda^2(E)_{\pm}$ are the two rank $3$ vector bundles over $M$ corresponding to the two sections above.
I'll expand on the hint given by Robert. $U(1)$ is just $S^1 \subset \mathbb{C}$, and its cohomology ring is the exterior algebra $\Lambda[c_1]$. Here, the subscript of the generator indicates its degree.
For $n = 2$, we have, as you described, a fibre bundle $U(1) \to U(2) \to S^3$. Thus there is a Serre spectral sequence with
\begin{equation}
E_2^{p,q} = H^p(S^3,\mathcal{H}^q U(1)) \cong H^p(S^3) \otimes H^q(U(1)) \Rightarrow H^{p+q}(U(2)).
\end{equation}
We have $E_2^{p,q} \cong \Lambda[c_1,c_3]$. By lacunary reasons, this spectral sequence collapses on the second page, and so we deduce $H^*(U(2)) \cong \Lambda[c_1,c_3]$.
In general, the spectral sequence for the fiber bundle $U(n-1) \to U(n) \to S^{2n-1}$ always collapses on the second page, and you can use induction to prove the proposition $H^*(U(n)) \cong \Lambda[c_1,c_3,\ldots,c_{2n-1}]$.
I like Mimura and Toda's The topology of Lie groups as a reference for these types of calculations. If I recall, they also discuss how to obtain the above proposition using Morse theory (or maybe just a rational decomposition of $U(n)$).
You also asked about $O(n)$, which is trickier. First, $O(n)$ is not path-connected, but has two path components each homeomorphic to $SO(n)$, so we may as well consider $SO(n)$ instead. There is a section in Hatcher (3.D) that is dedicated to computing the mod 2 cohomology of $SO(n)$, using a cell decopmosition.
You can also compute the mod 2 cohomology of $O(n)$ and $SO(n)$ using spectral sequences, but the problem here is that the analogous spectral sequences need not collapse, so the analysis is more subtle. One can instead induct on Stiefel manifolds, which generalize $O(n)$. I learnt how to do this from May et al's notes on characteristic classes. In particular, see Theorem 2.4 for the cohomology groups of $SO(n)$, although the ring structure requires consideration of Steenrod operations. May also discusses cohomology away from the prime 2.
Best Answer
Assume that we already know that the action is transitive. Then what is the stabilizer of the point $v=(0,...,0,1) \in S^n?$ I claim that if we let $O(n)$ be identified with the subgroup of $O(n+1)$ of all matrices of the form
$$\begin{pmatrix} A & \vdots \\ & 0\\ \dots 0 & 1 \end{pmatrix}$$
where $A \in O(n)$, then $O(n)$ is the stabilizer at $v \in S^n$.
(This new block matrix is clearly orthogonal since the dot product of two different columns are still zero and dot product of a column with itself is $1$)
$\textbf{Proof:}$
Let $B \in O(n+1)$ and $Bv = v$ so that $B$ is in the stabilizer at $v$. Then the rightmost column of $B$ has to be
$$\begin{matrix} \vdots \\ 0\\ 1 \end{matrix}$$
(we just make a direct computation of $Bv$)
and for $B$ to be orthogonal two different columns dot producted with eachother has to be zero. In particular for the rightmost culumn $ (b_{i,1},...,b_{i,n+1}) \ \cdot \ (0,...,0,1) = 0$ if $i \neq n+1$ which implies that $b_{i,n+1} = 0$ for all $i \neq n+1$. What this says is that $B$ is of the form
$$\begin{pmatrix} B' & \vdots \\ & 0\\ \dots 0 & 1 \end{pmatrix}$$
for some $n \times n$ matrix $B'$. Verifying that $B'$ is orthogonal is easy using the dot product of columns definition (dot product of two different columns has to be $0$ and the dot product of a column with itself is $1$).
It is simple to check that any matrix of the form
$$\begin{pmatrix} B' & \vdots \\ & 0\\ \dots 0 & 1 \end{pmatrix}$$
where $B' \in O(n)$ fixes $v$.
This proves that $O(n+1)_v = O(n)$.
$$\tag*{$\blacksquare$}$$
Now on to proving the result about homotopy groups.
The long exact sequence in homotopy groups associated to the fiber sequence
$$O(n)=O(n+1)_v \rightarrow O(n+1) \rightarrow O(n+1)v = S^n$$
(we used transitivity for last equality)
then becomes
$$...\rightarrow \pi_{i+1}(S^n) \rightarrow \pi_{i}(O(n)) \rightarrow \pi_i(O(n+1)) \rightarrow \pi_{i}(S^n) \rightarrow ...$$
Then if $i+1 < n,$ $\pi_{i+1}(S^n) = \pi_{i}(S^n) = 0$ so the map $$\pi_{i}(O(n)) \rightarrow \pi_i(O(n+1))$$ is an isomorphism if $i \leq n-2$. Then for induction it is simple to prove that $$\pi_{i}(O(n+k)) \rightarrow \pi_i(O(n+k+1))$$ is an isomorphism for positive $k$ if $i \leq n-2$ since $i \leq n-2$ implies that $i \leq n+k-2$.
$$\tag*{$\blacksquare$}$$
Hope you find this helpful!