Tight connection in Frankfurt
Do I have to go through customs there when connecting flight to Malta?
Assuming this is on one ticket:
No, customs is always at the final destination within the EU. You do not say where you are travelling from, but if from outside the Schengen area, you will have to go through immigration (passport control) in Frankfurt. Usually, this should not take more than about 10 or 15 minutes, but it could be longer if you are unlucky.
Customs is for goods, it is where they check the contents of your luggage. This (obviously) cannot be done until you have reclaimed your luggage at your final destination. Customs is spot checks only, must people walk through without stopping and it takes less than 1 minute.
Immigration is for people, this is where they check your passport and if necessary stamp it). This takes place at the point you enter the Schengen Area. In your case Frankfurt (assuming you are starting outside the Schengen Area). Immigration can have long queues and take from 5 to 45 minutes.
Is this one through ticket or two? If it is one through ticket the airline is responsible for you getting the next flight.
If it is two tickets, you will have to reclaim your luggage and re-check in at Frankfurt. This will take a lot longer and you alone are responsible for being on time for the second flight.