As explained here Extending vector bundles on a given open subscheme the only possible such extension is $$ \tilde{L} = (i_*L)^{\vee\vee}, $$ where $i \colon U \to X$ is the embedding. The sheaf $\tilde{L}$ is a reflexive sheaf of rank 1 on $X$. So, if $X$ is locally factorial (i.e., every Weil divisor on $X$ is Cartier) then $\tilde{L}$ is a line bundle. Otherwise, this is not necessarily true. For example, let $X$ be the 2-dimensonal quadratic cone, $U$ its smooth locus, and $\tilde{L}$ the ideal of a line on $X$. Then $L = i^*\tilde{L}$ is a line bundle, but its unique reflexive extension $\tilde{L}$ is not.
For any normal variety one has $Pic(U) = Cl(X)$$Cl(U) = Cl(X)$, so you get $Pic(U) = Pic(X)$ if and only if $X$ is locally factorial along the complement $X \setminus U$.