Monroe's observation about $0^\sharp$ is certainly a natural example, but let me point out that in fact one doesn't need $0^\sharp$ to make such a situation happen. The consistency strength of having a real that is not set-generic over $L$ does not actually go beyond ZFC itself.
To see this, start in $L$ and then undertake class forcing to $L[G]$, for example with Easton forcing to change the continuum function unboundedly often in the ordinals (or keep GCH, really anything will do, as long as you do proper class sized forcing). Now, over $L[G]$, we can perform Jensen coding (Coding the universe) to add a real $r$ by class forcing to $L[G][r]$ such that $L[G][r]=L[r]$. The real $r$ exists in $L[G][r]$, but it is not $L$-generic for any set forcing in $L$, as in your question, since to add $r$ over $L$ also adds all the sets added by $G$, and these objects cannot be all added by set-sized forcing of a fixed size.
Thus, we produce a model of ZFC having reals that are not set-generic over $L$.
This kind of example shows that your question is sensitive to the issue of whether you are considering set-sized forcing or proper class forcing. In the former case, one can express in a first-order manner whether a given object is set-generic over $L$; in the latter case, there are various meta-mathematical obstacles preventing this.
Lastly, you might be interested in Gunter Fuchs's concept of solidity, namely, a set $z$ is said to be solid in $V$ if it cannot be added by set-forcing over any inner model. In other wordsThat is, $z$ is solid just in casesolid if whenever $G\subset\mathbb{P}\in L[A]$$W\subset V$ is an inner model of ZFC and $G\subset\mathbb{P}\in W$ is $L[A]$$W$-generic, with $z\in W[G]\subset V$, then $z\in W$. This is equivalent to saying that for anyevery set $A$, andif $z\in L[A][G]$$G\subset\mathbb{P}\in L[A]$ is $L[A]$-generic and $z\in L[A][G]\subset V$, then $z\in L[A]$. Fuchs goes on to define the solid core and he and Ralf Schindler have investigated the solid core in connection with various canonical inner models of large cardinals.