Are there $\sigma$-algebras that cannot be written as a $\sigma$-algebra generated by a random variable? Can all $\sigma$-algebras $\mathcal{F}$ be written as $\mathcal{F}=\sigma(X)$ for some random variable $X$?
Or is there an example of a $\sigma$-algebra $\mathcal{F}$ that cannot be written as $\mathcal{F}=\sigma(X)$ for any random variable $X$?
 A: Yes and no.
No: Taking the union of two comments: $\sigma(X)$ is countably generated. Hence the cardinality of $\sigma(X)$ is no larger than $c$ (cf. the proof that the Borel algebra on the line has cardinality $c$), so for example the power set of $\Bbb R$ is not $\sigma(X)$.
Yes: The answer becomes yes if we add a hypothesis:


If $A$ is a countably generated $\sigma$-algebra there exists $X$ such that $A=\sigma(X)$.


Proof: Say we have sets $E_1,E_2,\dots$ and $A=\sigma(E_1,E_2,\dots)$. Let $$X_n=\Bbb 1_{E_n}$$and define $$X=\sum_{n=1}^\infty 3^{-n}X_n.$$
Now $X$  is certainly $A$-measurable, which is to say  $$\sigma(X)\subset A.$$The notation for a formal proof of the opposite inclusion would be tedious; it seems like a few examples should be convincing and easier to read (certainly easier to write): Note that $$E_1=X^{-1}\left(\left[\frac13,\frac 13+\frac 1{2\cdot 3}\right]\right),$$so $$E_1\in\sigma(X).$$
Similarly 
$$E_2=X^{-1}\left(I_2\cup\frac13+I_2\right)$$where
$$I_2=\left[\frac19,\frac19+\frac1{2\cdot 9}\right],$$etc. Possibly I got the arithmetic wrong here. what with fractions and geometric series. But it's clear, at least to me, that $E_n$ is  $X^{-1}$ of the union of $2^{n-1}$ intervals.
If you're trying to verify what I said about $E_2$and you're getting confused: Show that $X^{-1}(I_2)=E_2\setminus E_1$ and $X^{-1}(1/3+I_2)=E_2\cap  E_1$.
Or note that $$X_1=\lfloor 3X\rfloor,$$ $$X_2=\lfloor 3(3X-X_1)\rfloor,$$etc.
A: Depends on your definition of random variable. If $X$ and $Y$ are random variables, is the joint variable $(X,Y)$ then a random variable? If so, then for any $\sigma$-algebra $\mathcal{F}$ it holds that $\mathcal{F}=\sigma((1_F)_{F\in\mathcal{F}})$.
