The only general method I know of is the following (we assume $G$ and $H$ compact and connected).

Let $g$ and $h$ be the Lie algebras of $G$ and $H$ respectively.and let $A$ be a $G$-module. Recall that the standard cochain complex $C^*(g,A)$ is defined as follows: $C^n(g,A)=Hom(\Lambda^n g,M)$ with the differential of $a\in C^n(g,A)$ given by

$$da(x_1,\ldots, x_{n+1})=\sum_{1\leq k<l\leq n+1}(-1)^{k+l+1}a([x_k,x_l],x_1,\ldots,\hat x_k,\ldots,\hat x_l,\ldots,x_{n+1})$$ $$+\sum_{m=1}^{n+1}(-1)^m x_m\cdot a(x_1,\ldots,\hat x_m,\ldots, x_{n+1}).$$

The relative cochain complex $C^*(g,h,A)$ is the subcomplex of $C^*(g,A)$ formed by all $a$ such that when $x_1\in h$ both $a$ and $da$ kill any $(x_1,\ldots, x_n)$, resp. $(x_1,\ldots, x_{n+1})$.

The cohomology of $C^*(g,h,A)$ is isomorphic to the real cohomology of $G/H$ when $A$ is the trivial 1-dimensional module.

This is programmable, but perhaps not very illuminating. Much more can be said when $H$ contains a maximal torus. In that case $G/H$ decomposes into Schubert cells of even dimension, so the integral cohomology is torsion free; one can compute the ranks of the cohomology groups and also the cup product.