Logistic regression metric I am interested to understand in which scenarios person should use sensitivity, specificity, and when should person opt for precision recall.
On a high level I understand for a balanced data set we should use precision, recall and if dataset is imbalanced we should use sensitivity and specificity. but I am not sure why they say it. If you people have different perspective, pls throw some light on how to perceive these.

None of those measures are at all appropriate for logistic regression.  The binary logistic regression model is a probability model.  Its predictive performance should be judged by measures making full use of the model's estimated probabilities.  For absolute accuracy, continuous calibration curves should be estimated (plot of actual probability vs. predicted probability with actual probability estimated in an independent test sample or using resampling).  For predictive discrimination there are many measures, the simplest of which is to show a histogram of predicted probabilities with many bins, or a rug plot, and observing the width of this distribution.  This article goes into several useful measures.  A commonly used measure of pure predictive discrimination is the $c$-index or concordance probability, which happens to be the area of a receiver operating characteristic curve.  This measures separation in predicted probabilities between observations with Y=0 and those with Y=1.  $c$ is not a sensitive measure but is easy to interpret.
Sensitivity and specificity are only useful in a retrospective case-control study in which a single binary X is collected separately for those with Y=0 and those with Y=1.  Sens and spec use reverse time conditioning so are usually not appropriate (they condition on the unknown to predict the known).
