cannot insert multiple commands into a prepared statement
You can do that in a single query using a writeable CTE:

with updated as (
   UPDATE bankdetails 
       SET bank_details = 'mysore',
           "PAN"= 123,
            bank_acc = 456,
            "UAN" = 789,
            tax = 'myy'  
  WHERE bankdetails.user_id = 79
  returning *
)
INSERT INTO bankdetails (user_id,bank_details,"PAN",bank_acc,"UAN",tax)
SELECT 79,'mysore',123,456,789,'myy'
WHERE NOT EXISTS (SELECT * FROM updated);


The insert will only be executed if the update did not change a row. 



You can even avoid writing the values twice:

with data (user_id, bank_details, pan, bank_acc, uan, tax) as (
  values (79, 'mysore', 123, 456, 789, 'myy')
), updated as (
   UPDATE bankdetails 
       SET bank_details = d.bank_details,
           "PAN"= d.pan,
            bank_acc = d.bank_acc,
            "UAN" = d.uan,
            tax = d.tax  
  FROM data d 
  WHERE user_id = d.user_id
  returning *
)
INSERT INTO bankdetails (user_id,bank_details,"PAN",bank_acc,"UAN",tax)
SELECT user_id, bank_details, pan, bank_acc, uan, tax
FROM data
WHERE NOT EXISTS (SELECT * FROM updated);


I don't know which programming language you are using, but for e.g. a JDBC PreparedStatement you can replace the data in the values(..) part with parameter placeholder: 

with data (user_id, bank_details, pan, bank_acc, uan, tax) as (
  values (?, ?, ?, ?, ?, ?)
)
...