You can calculate it using Ohm's law by applying it twice: once to R1+R2 to find the current in the entire circuit, then again to find the voltage across R2.
But it's much faster if you know the divider formula, especially if you are trying to calculate for an unknown R1 and R2. Usually you are trying to calculate the resistances required to produce a voltage rather than the voltage produced by two resistances.
After you simplify all the equations down again, you just get the divider formula. So it's all the same.
In general, don't mistake someone using one approach to mean that no other approaches will work, especially if the other approaches are more fundamental. They probably just take more work because they are more general thus more versatile. Or sometimes, there's multiple methods of equal complexity and the author just had to choose one and did not feel like going through every possible approach.
If your brain is full and have to pick between remembering the divider formula or Ohm's law...pick Ohm's Law. Every time. It's more fundamental and can be applied in more situations and the divider equation comes from it.