If $Y$ is an affine scheme, and $G$ is an $O_Y$-module, then why is $\operatorname{Hom}_{\operatorname{Mod}(Y)}(O_Y, G)\cong G(Y)$? Question is entirely captured by the title. This has just been stated in a proof, and despite writing things out on paper I have not been able to see exactly why it should always be true. Potentially I am missing something simple, but I am stumped. It feels like it should somehow follow from the Yoneda lemma. 
 A: $\DeclareMathOperator{\spec}{Spec}$Possibly it follows from Yoneda. The lemma has a lot of corollaries and I don't have a good intuition for all of them yet. This specific result is easy enough to explain, however.
You have a map from $\mathcal{O}_Y \to \mathcal G$, that gives you, in particular, a map  $\mathcal{O}_Y(Y) \to \mathcal G(Y)$ on global sections. Now you just look at where the global section $1_Y$ goes and you get your element of $\mathcal{G}$.
Conversely, given an element $x$ of $\mathcal G(Y)$, you can define a map $\mathcal{O}_Y(Y) \to \mathcal G(Y)$ by sending $1_Y \mapsto x$ and extending by linearity. (I.e. $f(a) = af(1) = ax$.) Once you have a map on global sections, you have a map $\mathcal{O}_Y \to \mathcal{G}$. Possibly you need $\mathcal{G}$ to be quasi-coherent for this (I'm not 100% sure).
To see this, let $Y = \spec(A)$ and $\mathcal{G} = \widetilde{M}$. Then our map $\mathcal{O}_Y(Y) \to \mathcal G(Y)$ is exactly a map $A \to M$. On the distinguished opens, $U_f = \spec(A_f)$, this map obviously induces a map $A_f \to M_f$. Once we know what the map $\mathcal{O}_Y \to \mathcal G$ looks like on distinguished opens, we know the entire map.

Update: without assuming $\mathcal{G} = \widetilde{M}$.
Given the map $\mathcal{O}_Y(Y) \to \mathcal G(Y)$ defined by sending $1_Y \mapsto x$, we get a map $\mathcal{O}_Y(Y) \to \mathcal{G}(U)$ by composing with the restriction $\mathcal{G}(Y) \to \mathcal{G}(U)$.
Now to define a map $\mathcal{O}_Y(U) \to \mathcal{G}(U)$, we send $1_U = (1_Y)|_U$ to $x|_U$. Now, because $\mathcal{G}(U)$ is a $\mathcal{O}_Y(U)$-module, this defines the entire map $\mathcal{O}_Y(U) \to \mathcal{G}(U)$. I.e. $f(a) = af(1_U) = a(x|_U)$.
