80% of population is vaccinated and 25% of infected had received the vaccine before being infected, what is the efficacy of the vaccine?
Lets denote
$\Pr(V) = 0.8$ (V="vaccinated")
$\Pr(I)$ is not given (I = "infected")
$\Pr(V\mid I) = 0.25$
What is the efficacy of the vaccine?
I am dumbfounded as I need to have either $\Pr(I)$ or $1-Pr(I)$ to solve any probability question related to this problem. For example $\Pr(I \mid V) = \frac{Pr(V \mid I)Pr(I)}{Pr(V)}$ which can be simplified because we know both $Pr(V)$ and $Pr(V \mid I)$: $Pr(I \mid V)=\frac{0.25*Pr(I)}{0.8}$, but then we hit brick wall as Pr(I) is not given.
My response to the OP's concluding paragraph:
It is a common misconception that vaccine efficacy means the probability $P(I^c|V)$ of non-infection given that one is vaccinated.
Rather, vaccine efficacy measures the increase in protection conferred by the vaccine.
Your risk $P(I^c|V)$ of non-infection depends on the disease prevalence, and your exposure, safety measures, state of health, and vaccination status; vaccine efficacy (and vaccine effectiveness, for that matter) is not measuring this probability!
(Vaccine effectiveness is with reference to real-world data, whereas vaccine efficacy refers to clinical-trial results.) Note that none of this discussion, including what follows, takes immunity duration into consideration.
My Answer to main Question:
The technical definition of vaccine efficacy is given at the bottom of my Answer here. Note that this formula is based on an equal number of vaccinated and unvaccinated study subjects, which is not the case in your problem.
But we can adapt: based on your given setup/context,
Thus, if the vaccine effectiveness is exactly $0\%$ (in other words, the vaccine has no effect), then we expect that among the infected, there will $4$ times as many vaccinated as there are unvaccinated subjects.
Since the actual multiple is $\frac{25}{75}=\frac13$ instead of $4,$ then the relative risk $R$ is $$\frac{\frac13}4=8.33\%,$$ so the vaccine effectiveness is $$1-R=91.67\%.$$