Can the Lagrangian be written as a function of ONLY time? The lagrangian is always phrased as $L(t,q,\dot{q})$.
If you magically knew the equations $q(t)$ and $\dot{q}(t)$, could the Lagrangian ever be written only as a function of time?
Take freefall for example. $$y(t)=y_0 + v_0t -(1/2)gt^2$$ $$\dot{y}(t)=v_0 -gt$$
Can the Lagrangian now be written as: $$L=KE-PE=(1/2)m\dot{y}^2-mgy=(1/2)m(v_0 -9.8t)^2-mg(y_0 + v_0t -4.9t^2)$$
Now the Lagrangian is written only as a function of time, and we can put in a time and find out what the Lagrangian is at any point in the motion. Is this legitimate? Forgive me if this is simple.
 A: *

*Using the EL equations (or inserting their solutions) into the action functional typically destroys the stationary action principle. For examples, see this Phys.SE post.


*Concerning OP's title question: If a Lagrangian $L(t)$ only depends on time $t$, then it can be written as a total time derivative $L=dF/dt$, and that means it is equivalent to the trivial Lagrangian $L=0$, i.e. the EL equations are trivial.
A: When doing this, it removes one of the great powers Lagrangian mechanics: the Euler-Lagrange equations, which are
$$\frac{d}{dt} \frac{\partial L}{\partial \dot{q}} = \frac{\partial l}{\partial q}$$
Notice in the equations, we have partial derivatives. So if we made $L=L(t)$, then the Euler Lagrange equations would give you $0=0$ (a beautiful fact, but nonetheless not very helpful). Plus, the Euler-Lagrange equations are meant to give you equations of motion, so one probably wouldn't be able to substitute equations for $q(t)$ or $\dot{q}(t)$ anyways.
Edit: There is actually a more fundamental problem when you do this (and thank you so much to Qmechanic and ZeroTheHero for bringing this to my attention). If you simply plug back the motion into your Lagrangian and then try to apply the Euler-Lagrange equations again, you will more than likely get the wrong equation  of motion. For example take the simple spring:
$$L = \frac{m\dot{x}^2}{2} - \frac{kx^2}{2} \implies m\ddot{x}=-kx \implies x=\sin(\sqrt{k/m}\cdot t)$$ (just one possible solution)
where we used the EL eqs. However, if we plug this back into our Lagrangian, we will not get the right equations of motion:
$$L = \frac{m\dot{x}^2}{2} - \frac{k\sin^2(\sqrt{k/m}\cdot t)}{2} \implies m\ddot{x} = 0$$(!!!)
